That does suck... Live and learn.
I'm really surprised that no one has recommended the use of two heaters.
I use and recommend the use of two heaters in 55gal/>, and even in smaller tanks at times...
After all that favorite colony of shellies in your 30gal shouldn't be compromised.
Two heaters, either one just capable of maintaining adequate temp in your average ambient room temp.
If one malfunctions it won't affect your tank enough to be fatal before you notice it, but it will be noticeable enough, giving you time to replace it.
The two together will allow for raising temps for treatments, e.g. ICH.
I also use two thermometers, one near each heater so as to catch a problem early.
I highly recommend the Coralife digital thermometer and for heaters the Won Bros Pro Heat IC Titanium and Visi-Therm Stealth.