I think youre thinking of getting a 60 day TR visa before you arrive in thailand. You apply for this online at this address. Then ypu go to immigration office any day before your 60 runs out and get a 30 day extension.
Check the date they stamp on your passport before leaving immigration. I've heard of stories of showing a 60 day visa and still only getting stamped for 30 days
Just enter on visa exemption (30 days) and then any time before it runs out go to your local immigration office and get a 30 day extention for 1900 baht each.
I thought if you leave the country and come back in you get another 45 days due to your passport. I could be wrong but hopefully someone who knows fir sure will correct me