Here's the thing about being an "old" programmer. If you can't keep up with the newfangled shit, then you probably shouldn't be competing against younger programmers, because at skill-level-parity they will beat you on speed and total hours spent, eh?
For example, the fact that FP is finally making it into mainstream development shouldn't throw you if you have had twenty years to experiment with e.g. Haskell, eh? The only thing close to surprising in decades is how well backpropagation works when you have hella data and CPU power.
By the time you have been programming computers for twenty years, you should be really good, or you're just a "jobber". There's no shame in that, the world needs jobbers, but yeah, just like in wrestling, there are very few old jobbers.
If you're not a jobber, then at some point you see through the fashion-driven parts of the IT ecosystem and figure out what you really want to do with yourself. At this point a lot of people switch to management, or start their own company. But that leaves the field (of programming) to the die-hards that really give a fig about it. So if you're still in the game, late in life, and you're capable, then yes, there is high demand and you can e.g. command hefty salaries.
(Disclosure: I'm 45 and employable.)
This is not a profession in which one can coast. Every year in which you're not learning something that makes you a better and more capable professional, whether at your job or on your own time, is one year in which you're falling behind the rest of the pack.
I know plenty of people well over 40 who are going great guns in the software industry, in leadership or consulting roles. I also have one former colleague who, sadly, isn't - he was a senior developer at a company for several years, but got laid off; he's experienced, but not as quick as he once was, and doesn't have any particular special roles on his CV, so couldn't immediately bounce into another job.
I turn 40 next year, and can't honestly put myself into any of the categories i list above, so i should probably start worrying about this myself!