I'm a few (but not many) years younger than you and it has worked for me. I got my first job at age 37 yrs with about 400 hrs. Now 38 yrs with 800 hrs total time I start with BA on A320 in a few weeks time. I have been fortunate that I had a previous career in the RAF as an engineer so I was "technically literate." Also, had a few people within the industry help me out along the way. These coupled with good exam results and first time passes in the flight tests all helped.
I have worked extremely hard but have also been incredibly fortunate. Luck, sadly, plays a large part in whether you get that first interview and job. Is it possible to get a decent flying job in your forties? Yes. Is it likely? Probably not.