At 40 I don't think my life is "worse", it's different. Instead of worrying about parents, peer acceptance and grades, acne and what clothing is considered "cool", I now worry about paying my bills, the environment, whether I can retire, and my... parents
There are always going to be life stressors there, they just change. I have gotten two degrees after the age of 30, I wasn't married until my mid 30s, I'm in better physical shape at 40 than I was at 15, and I know who I am now better than I did 20 years ago. Honestly, if I wasn't neck-deep in depression I'd say my life is way better now than it's ever been.
The problem is I have lost so much support along the way. 40 years of parental pressure has worn me down. Over a decade of a career I didn't want and that is pretty unrewarding is exhausting. Through it all I've had a partner that has been borderline abusive at times. All of this combined has driven me to where I am.
I don't think anyone can give a hard cutoff as to when it is "too late" to have a good, happy life or when your life starts to take a hard decline. Hell, I've had relatives in their 90s still loving life. It heavily depends on the life choices you make and who, if anyone, will be there to support you through it.