(a) Except as provided in subdivisions (b) and (c), a judgment lien on real property created pursuant to Article 2 (commencing with Section 697.310) of Chapter 2 does not attach to a declared homestead if both of the following requirements are satisfied:
(1) A homestead declaration describing the declared homestead was recorded prior to the time the abstract or certified copy of the judgment was recorded to create the judgment lien.
(2) The homestead declaration names the judgment debtor or the spouse of the judgment debtor as a declared homestead owner.
(b) This section does not apply to a judgment lien created under Section 697.320 by recording a certified copy of a judgment for child, family, or spousal support.
(c) A judgment lien attaches to a declared homestead in the amount of any surplus over the total of the following:
(1) All liens and encumbrances on the declared homestead at the time the abstract of judgment or certified copy of the judgment is recorded to create the judgment lien.
(2) The homestead exemption set forth in Section 704.730.