A mechanic's lien notice of which has been filed on real property or a bond given to discharge the same may be vacated and cancelled or a deposit made to discharge a lien pursuant to section twenty may be returned, by an order of a court of record. Before such order shall be granted, a notice shall be served upon the lienor, either personally or by leaving it as his last known place of residence, with a person of suitable age, with directions to deliver it to the lienor. Such notice shall require the lienor to commence an action to enforce the lien, within a time specified in the notice, not less than thirty days from the time of service, or show cause at a special term of a court of record, or at a county court, in a county in which the property is situated, at a time and place specified therein, why the notice of lien filed or the bond given should not be vacated and cancelled, or the deposit returned, as the case may be. Proof of such service and that the lienor has not commenced the action to foreclose such lien, as directed in the notice, shall be made by affidavit, at the time of applying for such order.
N.Y. Lien Law § 59