Look around on the circuit board for burn marks, look for vented capacitors, and for holes in the sides of any MOVs present.
It's probably fine to reuse if none of the above issues are present, unless you just plain wore it out from frequent power outages where you ran it as long as possible so it got hot often, or it's an online UPS so it was always operating the SMPS circuit.
However it appears to use a pair of ~5Ah, 12V batteries to arrive at your $30 replacement cost, which is a somewhat high cost per capacity. That would sway me to look around for deals on a new UPS because the value of the old one is offset by the cost per capacity. Edit: Batteries have gotten more expensive since the last time I shopped for them, but I can still get a pair of 8Ah/12V for close to $32 and the price per Ah goes down as they get larger.