(a) When a debt secured by any lien mentioned in this article is fully paid at any time after the lien creditor shall have filed his notice of such lien in the office of the clerk of the county commission, such creditor assignee shall cause the clerk to enter a discharge of such lien in the margin of the book in which such account is entered and immediately opposite thereto, or shall execute a release thereof, which shall be recorded in the book in which such notice is entered and noted on the margin of such notice.
(b) (1) At any time after a lien creditor has given notice of lien as required by the provisions of this article and has subsequently duly filed such notice of lien with the clerk of the county commission as provided for in this article, the owner or any person against whom the lien is claimed may apply to the circuit court having jurisdiction to enforce such lien, by petition, for an order authorizing such owner or other person against whom the lien is claimed to deposit, in escrow, with the clerk of the circuit court, an amount equal to the sum set out as due in the notice of lien, and directing the circuit clerk to execute a release of the lien. Previous to the filing of such petition, the petitioner shall cause to be served upon the lien creditor a notice of the time and place that such application will be made, which notice shall be served by registered mail, return receipt requested, addressed to the lien creditor or his authorized agent at the address set forth in the notice of lien: Provided, That if no such address is set forth in the notice of lien, the petitioner shall serve the notice, setting forth the time and place that his application will be made, in the same manner as original process is served for the commencement of civil actions.
(2) At the hearing upon the petition, the court shall ascertain what interest, if any, might reasonably be expected to accrue on the sum claimed to be due, either by contract or by operation of law, and subsequently be payable to the lien creditor, should he prevail upon his claim. The court shall also determine the current rate of return upon investments made by the general receiver of the court at the time of the hearing, and ascertain what rate of interest might reasonably be earned upon the petitioner's escrow deposit when paid into the court. To the extent that the anticipated interest due to the lien creditor exceeds the anticipated return upon the investment of the escrow deposit, the court may require an additional deposit beyond the sum set forth in the notice of lien, as the interests of the parties may require. The order authorizing the deposit and directing the execution of the release shall, if the court anticipates that complex or extended litigation may arise in resolving the issue of the validity of liens or claims in the case, require that the petitioner or other parties give security before the court, or the clerk thereof, for payment of the costs which may be awarded in the court, and of the fees due, or to become due, in any action to determine such issue.
(3) If an escrow deposit is authorized by the court, such deposit shall be made by cash, and when paid into court, shall be received by the general receiver of the court, who shall take charge of and invest the money deposited in the manner provided for in section one, article six, chapter fifty-one of this code until otherwise ordered to pay out or dispose of the same by the circuit court. Upon presentation to the clerk of the county commission wherein the notice of lien is filed of an order of the court and a receipt executed by the clerk of the circuit court for the amount required to be deposited by the terms of the order, the clerk of the county commission shall file the order and shall enter a discharge of the lien in the margin of the book in which such account is entered and immediately opposite thereto, or shall execute a release thereof, which shall be recorded in the book in which such notice is entered and noted on the margin of such notice.
(4) Unless an action to determine the validity of the creditor's claim is commenced within six months after the creditor shall have filed his notice of lien in the office of the clerk of the county commission as provided for in this article, the court shall, upon motion of the depositor, order the general receiver to pay out to the depositor the sum deposited, together with any dividends and interest, if any, earned upon the investment of the deposit, less any compensation for the services of the general receiver as the court may direct in accordance with the provisions of section seven, article six, chapter fifty-one of this code. If the claim is satisfied or settled and compromised at any time while secured by the deposit made with the general receiver but before an action is commenced, the court shall, upon proof of satisfaction or settlement and compromise, order the general receiver to pay out the deposit to the depositor in the same manner as though suit was not commenced within the requisite period of six months as described above. If an action is commenced, the general receiver shall thereafter pay out the money deposited and the dividends and interest, if any, earned upon the investment of the deposit, as the court may order or decree, less any compensation for the services of the general receiver as the court may direct in accordance with the provisions of said section seven.