The dark wanderer's answer is of course correct. I'd like to add some supporting Greyhawk lore and potential explanations for Mordenkainen's apparent longevity.
According to the D&D 3e Epic Level Handbook, p. 309, which describes Mordenkainen circa 591 CY:
His apparent age is around 40 (though his true age is twice that).
This places his birth at around 511 CY, and Greyhawk wikis tend to assert an implied date of 509 CY, which is well within that range.
But more importantly, this shows that Mordenkainen has some method, almost certainly magical, of aging at a slower rate or perhaps not at all. His secret is never canonically explained, and we can only speculate.
Potential solutions with some precedent in Greyhawk or generic D&D lore include:
- He could be of the Children of Johydee: A few people of Aerdi descent possess exceptional magical talent and natural longevity, protected by the goddess Johydee. Gwydiesen of the Cranes is one such individual, who is over 700 years old, yet appears only 60.
- Wish: Garaeth Heldenster used a wish spell to age at one-fifth the normal rate. (The Marklands, p.39) Mordenkainen may have made a similar wish, and is certainly powerful enough to cast that spell.
- Pact with an extraplanar being: Karoolck, court mage of Overking Ivid V, made a pact with Baalzephon, guaranteeing him a lifespan of 333 years, during which he will not age, and will return to life up to 9 times if slain. (Ivid the Undying, p.38)
- He steals the life from others: General Reynard possesses a magical homunculus created by the archmage Reydrich, which must drain the life from one victim per year. As a result, Reynard is physically in his mid-30s despite actually being 78 years old. Reydrich is unlikely to offer the same deal to Mordenkainen, who rejected his entry to the Circle of Eight c. 570 CY. (Ivid the Undying, p. 113-114)
- Various magic items:
- Amulet of Perpetual Youth: This amulet absorbs up to 5d6 years of aging. (Encyclopedia Magica I, p.38)
- Amulet of the Papyrus Scepter: Reduces a character's age by one year every year for 1d6+4 years. (Encyclopedia Magica I, p.38)
- Elixir of Youth: Reduces the user's age by 1d4+1 years. (Encyclopedia Magica II, p.446)
- Timeglass of the Wizard: Reduces the user's age by 2 years. (Encyclopedia Magica II, p.602)
- Potion of Longevity: Reduces the user's age by 1d12 years. (_Encyclopedia Magica III, p. 877)
- Undead animus: Drax the Invulnerable is immune to aging due to being an animus, a type of undead in the service of Overking Ivid V. Prince Hastern of Naelax, another animus, managed to become an animus while retaining his appearance. Mordenkainen is unlikely to be an animus, since they are practically always evil, and his statblock shows him to be a living human. (Ivid the Undying, p.102)
- He may look younger than his age: A few Greyhawk characters are simply much older or younger than they appear. Jaryn Lejenaus is 31 years old, but appears to be only 15. (From the Ashes, p.81) This wouldn't explain Mordenkainen's superhuman longevity, however.
- Epic spell: Mordenkainen may have invented some secret unknown magic. (Epic Level Handbook)
- Divinity: Mordenkainen may have achieved at least divine rank 0, becoming a quasi-deity or hero-deity, granting effective immortality. Several Greyhawk heroes have achieved this status, including Heward, Keoghtom, Murlynd, Daern, Johydee, Nolzur, Quaal, Tuerny, and Kelanen.
- Mordenkainen has visited other worlds and is a good friend of Elminster of the Forgotten Realms; he may share whichever secret of longevity is used by the Sage of Shadowdale.
- Clone: He may create a clone, get killed a decade later, and find himself in a younger clone.
- Raise dead: Mordenkainen may spend much time dead, which would not count toward his effective age, but would give the illusion that he is much older than he really is.
- Non-linear time: Time travels at a different rate on some planes. Mordenkainen may have been in one such plane for some time, perhaps even a pocket dimension of his own creation. He may age only one year while ten or a hundred years pass. There are even in theory planes where time flows backward.
- Astral travel: One does not age on the Astral Plane.
- Hanging out in England: In Dragon #100's The City Beyond the Gate, a portal exists between the AD&D world (Greyhawk being one such world) and London, England, through which time passes non-linearly at a rate of one day to one month (28 days in Greyhawk). Mordenkainen could spend 5 years in London, only for 140 years to pass back home.
- It's possible that the flow of time is convoluted in Greyhawk. No official products have advanced the World of Greyhawk timeline past the D&D 3e era (590s CY), meaning that, for all we know, the timeline of other worlds may not match up with the Greyhawk timeline in the expected manner. Mordenkainen's travel to Barovia may, from his perspective, still have occurred during the 590s CY.
This is, however, still speculative. Ultimately, we don't know which method he used, and Mordenkainen may possess some magic not listed here, so it all really boils down to he's a wizard.