(a) owned by a person liable to the fund for such costs under section one hundred eighty-one of this part at the time a notice of environmental lien is filed; and
(b) upon which the discharge occurred. 2. An environmental lien shall attach when:
(a) cleanup and removal costs and damage costs are incurred by the fund;
(b) the person referred to in subdivision one of this section fails to pay such costs within ninety days after a written demand therefor by the administrator is mailed by certified or registered mail, return receipt requested; and
(c) a notice of environmental lien is filed as provided in section one hundred eighty-one-c of this part; provided, however, that a copy of the notice of environmental lien is served upon the owner of the real property subject to the environmental lien within thirty days of such filing in accordance with the provisions of section eleven of the lien law. 3. An environmental lien shall continue against the real property until:
(a) the claim or judgment against the person referred to in subdivision one of this section for cleanup and removal costs and damage costs is satisfied or becomes unenforceable;
(b) the lien is released by the administrator pursuant to this subdivision;
(c) the lien is discharged by payment of moneys into court; or
(d) the lien is otherwise vacated by court order. Upon the occurrence of any of the foregoing, except where the lien is vacated by court order, the administrator shall execute the release of an environmental lien and file the release as provided in section one hundred eighty-one-c of this part. The administrator may release an environmental lien where:
(i) a legally enforceable agreement satisfactory to the administrator has been executed relating to cleanup and removal costs and damage costs or reimbursing the fund for cleanup and removal costs and damage costs; or
(ii) the attachment or enforcement of the environmental lien is determined by the administrator not to be in the public interest. 4. An environmental lien is subject to the rights of any other person, including an owner, purchaser, holder of a mortgage or security interest, or judgment lien creditor, whose interest is perfected before a lien notice has been filed as provided in section one hundred eighty-one-c of this part.