See, I'm 63. My current life expectancy is more like 18 years, so 10 years would be... maybe a bit short? But not so short that I can claim to be really ripped off. But the other side is, a guarantee that that I'd make 10 years is better than my pessimistic scenarios, so that would be a step up.
What would I do? Probably retire today. The problem with retirement planning is that you don't know how long you're planning for; if you did know, it would simplify a lot.
I'd make an effort to spend more time with my kids. It's not just that I only have 10 years - they also have only 10 years to have me around.
I am a Christian. I'd try to pass on some of what I've learned to the younger generations. (I mean, maybe more in general too, but what I've learned about coding, say, isn't going to change anybody's life.)
I'd probably watch what I eat less. That piece of chocolate cake won't be what kills me.
I'd hopefully be more patient toward people. There are a lot of things that aren't worth getting mad at them over.