Like we've been talking for the past two or so years, anyone with a pre-pandemic lease will make out like a bandit in today's market, no matter how you slice it.
You won't touch a truck like that for ~$31K so if you need a truck, by all means finance or pay cash for the residual. I'd find a nice credit union rate and finance it. You could drive it for another 2yrs, sell it and still makes some money. I don't see the current vehicle market changing much, if at all going forward.
If you don't need the truck, sell it for ~$41K and pocket the $10K leftover.
I would personally avoid buying anything new/used at the moment if you can avoid it.
A new lease started today is going to reflect the pricing today. So this similar truck would have a ~$41K residual at lease end.