Normal deal with your country’s embassy in thailand they issue temp passport to return home then you get new passport I in your country when you go home that’s the process for Australia
If in Au call thai embassy you can extend a month then extend again in thai if still doing this in Au gives you 3 months because 30 days is single entry so you can’t exit thai check see if this still the same only embassy will give you correct information just call them