At any time after an action is brought under the provision of this article, the owner may make and file with the clerk with whom the notice of lien is filed, if in a court of record, and if in a court not of record, with the court, an offer to pay into court the sum of money stated therein, or to execute and deposit securities which he may describe, in discharge of the lien, and serve upon the plaintiff a copy of such offer. If a written acceptance of the offer is filed with such clerk, or court, within ten days after its service, and a copy of the acceptance is served upon the party making the offer, the court, upon proof of such offer and acceptance, may make an order, that on depositing with such clerk, or court, the sum so offered, or the securities described, the lien shall be discharged, and that the money or securities deposited shall take the place of the property upon which the lien existed, and shall be subject to the lien. If the offer is of money only, the court, on application and notice to the plaintiff may make such order, without the acceptance of the offer by the plaintiff. If such action is brought in a court not of record, such order may be made by the county court of the county where such action is brought upon notice, and upon filing such order and depositing such sum of money or securities with the county clerk of such county, he shall forthwith discharge said notice of lien, by writing upon the margin of the record thereof, the words "discharged by payment." Money or securities deposited upon the acceptance of an offer pursuant to this section shall be held by the clerk or the court until the final determination of the action, including an appeal.
N.Y. Lien Law § 55