Notwithstanding any other provisions of this part, any person owning or having any interest in any property may at any time after commencement of an action or proceeding for sale or foreclosure pursuant to Chapter 6 (commencing with Section 6500) or Chapter 11 (commencing with Section 6610) of this part and before sale of that property to enforce the lien arising thereon for failure to make any payment of the principal or of the interest upon any bond which has become delinquent apply to the treasurer for reinstatement of the bond. As used in this part “commencement of an action or proceeding,” or variants thereof, means the date of filing with the county recorder of a notice of pendency of a sale or foreclosure pursuant to Part 3 (commencing with Section 3120) of Division 4.5 of this code or, if such notice of pendency is not required to be filed with the county recorder, (i)in the case of proceedings for a treasurer’s sale pursuant to Chapter 6 (commencing with Section 6500) of this part, the date of receipt by the treasurer of the written demand provided for by Section 6500, or (ii)in the case of a foreclosure action brought in the superior court pursuant to Chapter 11 (commencing with Section 6610) of this part, the date of filing the complaint with the clerk of court.