In Bangkok if you are stamped in on a TR60 stamp <- meaning you bought a tourist visa from the thai consulate before you came here and were stamped in for 60 days you go to the main immigration office on Chaengwattana road in the government complex Building B, you want counter J.
You can go apply any time you have 45 days or less left on your current stamp. It is 1900baht and they will add the 30 days on to the current expiration date you have now
There are copy shops in the basement of the building that will make the copies you need and fill out the form and do the passport photo if you need.
Make sure you take proof you're staying IN bangkok when you go apply (TM30 receipt from your landlord/hotel, or something)
****************************