Excepting in cases where the dower interest of the widow of a decedent is sold during process of administration of such decedent's estate, in all cases where lands are sold for division among joint owners or tenants in common and where lands are taken under the power of eminent domain, and one or more persons own a dower or life interest in the whole or in an undivided interest in such lands, the court having jurisdiction of the action in which such lands are sold or taken, as aforesaid, after the proceeds are paid into court, shall, upon the sworn application of any person owning such dower interest or life interest, or any remainder or reversionary interest therein, ascertain the present value of such dower or life estate and pay to the owner of such dower or life interest in cash the value of such interest, the remainder to be paid to the reversioners or remaindermen.