In all cases where land or lands shall be sold at sheriff's sale for the purpose of collecting the amount due on forfeited appearance bonds in criminal cases, the state shall be authorized to purchase any of the lands. The amount paid by the state for the purchase of the lands shall in no case be greater than the amount of the bond upon which forfeiture has been taken and upon which the forfeiture the execution was issued.