Any person claiming an undivided part of any real property sold for taxes may redeem the property on paying such proportion of the purchase money, interest, costs, and subsequent taxes as he or she claims of the real property sold. The owner or occupant of a divided part of any real property sold for taxes or any person having a lien thereon or interest therein may redeem the property by paying the taxes separately assessed against such divided part, together with interest, costs, and subsequent taxes. If no taxes have been separately assessed against such divided part, then it shall be the duty of the county assessor, upon demand of the owner or lienholder or upon the demand of the county treasurer, to assess the divided part and to certify the assessment to the county treasurer. The owner or lienholder of the divided part may thereupon redeem the divided part upon the payment to the county treasurer of such sum so assessed, together with interest thereon, costs, and subsequent taxes. The county treasurer shall make a proper entry of such partial redemption in his or her record, and no deed thereafter given shall convey a greater interest than that remaining unredeemed.