Many young players around 25-year old even don't have good physical strength and high ambition like Cristiano Ronaldo. A player around 40-year old is playing more remaining physical strength, if not last, and mostly relying on his experience and skills gathered through his long career in order to have good positioning and take advantage of any chance for scoring goals and making difference for his team.
Cristiano Ronaldo is weaker physically with years but it's human trend and naturally no player can win against ageing forever. He is enjoying very last seasons in his career at as highest level and scoring as most goals as possible.
That is the key, he is keeping his fitness to a high level, so he could be playing until this age. We have seen plenty of players who retire at 35 years old, back in the day it was more common than right now, right now not many do, but even now there are some.
Kroos was younger than Modric by a good margin, and he already retired last season, Modric played one more season at real after that, and now he will play for Milan, so there are different ages to retire. But we have seen people retire at earlier age, and then they gained weight and become very fat, even some obese, at age 40 already. Mostly because when you quit training, but eat like you are training, you gain weight. Ronaldo's physical attributes is the reason why he is doing great.