If, prior to the expiration of the period as defined in sections 38-39-201 and 38-39-202 during which any recorded mortgage or deed of trust constitutes a lien, there shall be filed in the office of the county clerk and recorder of the proper county a notice of an action pending to foreclose such lien or a notice of election and demand for sale, the lien created by such instrument shall continue until final disposition of the action or foreclosure proceeding.