The earliest use of the phrase 'mixed company' - from the early 1700s - meant a group consisting of individuals of differing birth, rank or character...ie not confined to one 'class'. The commonest modern meaning of the phrase is, however, a company of both males and females, a meaning which had appeared just a few years after the date I suggested above for the other. They are both, therefore, more or less equally old, but - apart from difficult social situations such as those described in Sft's answer - it is almost invariably nowadays a gender thing.