48 here. Been coding since I was 12. Been doing it professionally since I was 18. On my team, I'm one of the younger coders. The folks who work nearest me are 51, 52, 49, and 55... There are young-uns on my team and my managers range from late 30's to early 50's in age. I ran my own company at one point, had up to 12 employees. That's where I learned that management was not my thing. I'm not a people person, I don't enjoy it, and as a result, I sucked at it. The company wasn't doing well so I shut it down and went back to working for others. The stress relief was amazing. Now I waltz in at a time that's convenient for me, and leave when I feel like it or when the work is done, depending on the current deadline. I bill for the hours I work. Annually, I get paid more than any of my managers do and I work fewer hours. They're not eligible for overtime but expectations are higher on them. As an old guy with tons of experience, I don't have to take every task they offer me. I make suggestions for things that need to be rewritten and get support for doing it. I have a fairly steady stream of solicitation from other sources so I grant myself some leeway. My current customer has had me for almost 10 years so I'm fairly certain they like what I do. Don't get me wrong, I do work hard and there are things I do that no one else on the team can do (though it'd be easy to hire someone else if they wanted).
I stay current by contributing to one or two open source projects here and there. I also hack on my own personal projects learning new skills in the process. My mind isn't what it used to be. I don't find myself 'in the zone' as often and I find that I have to force the code out of me more often. I keep wondering when someone in management is going to realize that I'm just not as smart as they think I am, but then I seem to consistently pull off something amazing and everyone's happy.
There are younger folks on my team who do some amazing things that I can't do and there are younger folks on my team who are largely useless...
I like this place in my life. I realize I'm one catastrophic medical event away from unemployment and have been saving accordingly. If necessary, I could stop working any time, simplify, and live on a fairly meager but manageable income. If I can hold it together for 7 or 8 more years, I can retire in relative comfort.