If you overstayed 30 days you’re going to have to pay a fine for those days and be ready to leave the country immediately.  you will then have to apply for a new visa at a Thai Consulate which will probably take you a few days or a week.  Be totally RESPECTFUL towards any of the authorities and don’t argue with them about anything they say. Just agree to do it. It wouldn’t hurt to dress a little more formally than wearing shorts and flip-flops, and for God’s sake bathe and wash your hair before you show up.