I think that I was way past 40 by the time I had to get legal on Google to get them to stop pestering me. Still doing a variety of coding with my CTO hat on and in my non-work time in my 50s...
Let's say you are not CTO but developer, and your CTO is 32yr old. Would you be as happy?
If they're up to the job (technically, managerially, personally), then yes, fine by me.