Its all about the art of the possible. Can you get a FATPL at 40?
Absolutely.
Can you get a job at 40, and a first flying job at that?
Well it depends a lot on expectation, attitude and ability.
At the moment the job market is awful, and airlines are looking for the cheapest possible solutions commensurate with the experience they require.
I think you have to be prepared to be in the wilderness for a couple of years whilst the world gets its act together.
The key is to be in touch with aviation all the time, and if you can, to be in touch with it in such a way that a potential employer regards you as a known quantity.
For example, work as cabin crew, work in ops, work in ground services etc etc.
Dont underestimate the Human factor in recruitment.
The alternative is to sign up for the whole line training package etc etc. this is however, expensive, and difficult to justify without some reasonable expectation of a job at the end of it. In the good times F/o's on such schemes found themselves instant employment. Now however many of the recent graduates have found themselves out on a limb after 6 months and 300 hours. Some will never return to aviation, will work like dogs to pay off their bank arranged "sponsored" overdrafts, and tell people that it was great while it lasted.
Others, for whom flying was maybe more than just a bank job, will go the extra mile and stay in touch with aviation.
The latter category stand a good chance when recovery sets in.
Its not all gloom, but at 40, if its just money you're after, you are barking up the wrong tree.
With realistic goals you may well succeed, and, like everything, if your not a player, you cant be in the game.
In other words, you may well make your own luck simply by being in the right place at the right time, clutching the right bits of paper and able to start on Monday!