Domesticated horses, with proper nutrition, medical care, and upkeep, can live up to 40-45 years.
A mustang, if taken off the range and domesticated, has as much chance as living a long healthy life as one born in a barn.
Trying to continually compare horses who have to find their own way in the world versus those who are taken care of by humans, is a futile effort.
The only reason our domestic horses live so long is because of the care they receive from their human handlers. If they were thrown out into nature, their lives would be as brutal and short as their feral cousins.
Feral horses have smegma build up, too. They also have leg, feet, and back problems, as well as contract diseases. The only difference is that they don't live long enough to get old. Once a physical disability raises it's ugly head, the feral horse becomes food for a large predator.