you'll go to any immigration office while in Thailand, 10 days before your exemption stamp (30 days) expires, and you get there an extension (additional 30 days) at a price of 1900 baht
I did it in 2018 at the Thai Embassy/consulate in Paris. My onward ticket was at the 89th day. Was good, no problems at all. Which makes sense, your plan is to stay 90 days, and you can stay 90 days. So why would they want to make it just difficult.