40 year old here. A few things:
- Forget about seeking a 'safe' job. Go find a startup to join. Don't worry about having to sleep on someone's couch.
- Save more.
- Go ahead and get that master's degree. It's pretty hard when you're married and have kids.
- Get into better shape and stay that way. At 40 losing weight is so much harder than it was back then.