When the laptop randomly shuts down and overheats it is most likely to be dust build up on the fan and heat sink not the battery. Try to clean the fan and heat sink, if it still overheats then just get a new laptop. It is not worth putting too much money on an old laptop.
If you are getting short run-times between 30 - 60mins, then replace the battery, not all laptop batteries are expensive depends on where you get it from and the durability. I had bought a new laptop battery for my Acer laptop from Ebay and it costs £22.99. The reason why it is cheap is because the battery comes from another country and the battery is not a Smart Battery.
A Smart Battery is a microchip that shows the battery State Of Charge, State Of Health, Designed Capacity, Current Capacity, Charge/Discharge Rate, Voltage, Charge Cycle Count etc.
The battery I have got is not a Smart Battery and only give the State Of Charge and capacity level.
If your laptop does not overheat after you have cleaned the fan and heat sink, then you should consider on getting a new laptop battery for max run-time. But it is up to to you.
A new laptop will give you a new battery and laptop and do not have to worry about the laptop overheating and short run-time.