There are OVER 80 immigration offices and most of them allow an extension when you have 30 days or less left on your stamp BUT some allow you to do it when you have 45 days or less..
So
@Andy ********
where in the glorious "Land 'O Thaiz" are you? <- as in what immigration office do you use?