When any warrant issued by the proper authorities of any county, township, city, town or school district shall have been presented for payment and the same is not paid for want of funds, the treasurer shall, upon and under the direction of the county board of such county, purchase and take up such registered warrant with sinking funds in his hands and hold such warrant for the benefit of the fund so invested until the same is paid in its order, as provided by law.