First of all you should tell people which province you are in. Because it’s your first time I don’t think online report will work. After this you can do it online 14-7 days before it expires. In Chiang Mai you have a very convenient drive through window - all you need is 90 day filled in application form TM47, the TM 30 should be in your passport anyway and your passport - takes about 2 minutes.
And don’t wait until your last day - you can do it a week before expiration.
*******************************************