Any mortgagee, lienholder, or other creditor, or any person having an interest but not the legal title shall have a lien on the lands for the amount expended by him in effecting a redemption; and, if such redemption is by a tenant in common, he shall have a lien on the interest of his cotenant.