The city council may, on refusal or failure of the successful bidder to execute the contract, award it to the next lowest responsible bidder. If the legislative body awards the contract to the second lowest bidder, the amount of the lowest bidder’s security shall be applied by the city to the difference between the low bid and the second lowest bid, and the surplus, if any, shall be returned to the lowest bidder if cash or a check is used, or to the surety on the bidder’s bond if a bond is used.