You would first have to apply for a non-o visa based upon marriage to a Thai first. The 400k baht only has to be in the bank on the day you apply for the visa. If you can get proof of at least 40k baht of income you could use it as well.
See: https://www.immigration.go.th/wp-content/uploads/2022/02/6.FOR-PROVIDING-SUPPORT-TO-OR-BEING-A-DEPENDANT-OF-A-THAI-CITIZEN-SPOUSE-VISA-NON-O.pdf
Then when you apply for the extension of stay the 400k baht will need to be in the bank for 2 months or use the proof of 40k baht income.