§ 142. Discharge of lien. Such lien may be discharged by a payment of the amount due thereon, by a failure to bring an action to enforce the same within the time prescribed in the preceding section, by the written consent of the lienor, duly acknowledged and filed with the proper officer to the effect that such lien may be discharged, and by the owner of such sandstone, cement stone, granite, bluestone, limestone or marble filing with such officer an undertaking in an amount equal to twice the sum specified in the notice of lien, executed by one or more sureties who shall justify in such amount and approved by the officer with whom the notice of lien is filed, conditioned for the payment of the sum due such lienor, by reason of such lien, and the cost and expenses of enforcing the same.