The holder of any lien on real or personal property may pay the tax thereon with interest and penalties and upon such payment shall be subrogated to the lien of the state, county, or municipality, and the sum so paid shall bear legal interest from the date of payment and may be collected in the same manner as the original claim of the lienholder.