I'd say it is similar case to the passport that expires while visa is still valid. You just need to travel with both passports and maybe have some additional documents about the marriage. But not speaking from the experience and an email to Thai embassy would be probably the best to get to know what is the correct approach.