Except as otherwise provided by contract, interest awarded on mechanics’ lien claims shall be calculated at the legal rate, as provided in section 334.01, from the time the underlying obligation arises until the expiration of 30 days after the claimant’s last item of labor, skill, or materials was furnished to the improvement and shall be calculated thereafter at the rate computed for verdicts and judgments, as provided in section 549.09.