You need a minimum of 15 workdays left on your tourist visa or visa-exempt stay permit, in order to apply for the “change of visa type” from a tourist visa entry or a visa-exempt entry, to a “90-days Non-Imm-O visa based on being married to a Thai wife”
It seems that you already wasted some time on your initial visa-exempt 30 days entry stamp. Your only option now is to buy the 30-days extension on Immigration for 1900.- THB to have the required days stay permit left in order to be able to apply for the “change”
I posted the link to the requirements for this application below. In your case, you need to tick number 6, it will open a pdf. document with a list of the requirements
Which are:
***you must show that you either have a minimum of 400.000.- THB on a bank account in your sole name. You must prove it with a letter from your bank and your updated bankbook
Or
Show an income affidavit from your embassy over a monthly income of minimum 40.000.- THB
*** your marriage must be acknowledged inside Thailand, and you need to bring a freshly printed marriage registry from the Amphur, it is called “Kor Ror 22”
In case you use the deposit method, you do not need to prove that the 400.000.- THB came from abroad (unlike for the "change" to a retirement Non-O) For the initial “change” to the 90-days Non-Imm-O visa, no seasoning of the funds is required. However this can be interpreted slightly different on some Immigrations.
The 90-days Non-Imm-O visa will be issued for 14 days “under consideration”. After 14 days you will need to visit Immigration to receive the 90-days Non-Imm-O visa stamp. The fee is 2000.- THB
*** up from 30 days before the 90-days stay permit out of the Non-Imm-O visa expire, you can apply for the “1-year extension of stay permit based on being married to a Thai wife”.
On the date of the application, the funds must have been seasoned in your account for two months, and you must prove it with a letter from the bank and your updated bankbook
*** the “1-year EOS” will be issued for 4 weeks “under consideration”. Immigration will visit you and your wife at home during this period
*** don’t touch the funds until you have received the full one-year “extension of stay” stamp
**********************************************