A second cousin of mine in his 40s, 50s works at a factory. He did a classics course through the Open University. He still works at the factory, because he likes the work, but he was more than able to do the course, and he felt that he was more prepared for the coursework at that age than if he had done it earlier.
For most people, the options are still there, you're just less likely to see them as an option. Never underestimate your potential later in life. As long as you maintain your levels of exercise and take care of your body, you are on average just as capable to change careers as you were when you were twenty.
As a secondary source, there was recently an Ask Hacker News thread of people who had started their programming careers in their fifties, I sadly cannot find the like :c