So I've hired a lot of older programmers, and a lot of older programmers are my best ones.
1) You can't fake management. I've fired far more managers than top technical guys. If you're not really into management, you're not going to make it. It's starting over in an entirely new skillset. Be a team lead for a few people if necessary or expected for your company.
2) Find a really tough area. It's probably not going to be the new cool language of the week. My top older programmers have been mainframe specialists, database architects, systems architects, data warehousing specialists. Whatever was really tough at the time. By focusing on really hard, complex problems you scare off the younger competition. It's ok, they want to work on the new shiny stuff anyway.
3) Learn to communicate. Those new young guys do, but they have their own style. Take advantage of your background and create your own style. You need to build partnerships with managers and customers so they have confidence in you. Make your experience valuable to the team doing peer reviews, designs, etc. Spend time mentoring new guys in the "right way" to build and maintain systems. Not being an old fogey/jerk -- just sharing the wealth with everyone new and old. My best old guys can reach across the org and get me access to data sources unreachable through the front door. Access to their "old guys network" and institutional knowledge is something they bring to the table. The young guys bring something else. I assign each to the jobs that are right for them.
4) Push the future from your perspective. The young guys are from an edgy and somewhat naïve perspective. You need to push the future from your perspective. If you keep your head down and keep programming, the young guys will win, one will get lucky and end up in management and potentially all hell will break loose. Even if you don't win, being part of the strategic planning process makes sure you stay in the game and the voice of experience and discipline is heard (and keeps middle aged guys like me in charge).
Some of my saddest days was guys retiring at 60+ or dying on the job. I can always hire new young guys -- it takes decades to get more experienced guys.