An option granted to a secured party by a debtor to acquire an interest in real property collateral takes priority as of its recording and is effective according to its terms if the right to exercise the option is not dependent upon the occurrence of a default with respect to the security agreement and, where the real property which is the subject of the option is other than residential real property containing four or fewer units, shall not be deemed invalid or ineffective on the basis that the secured party has impaired the debtor's equity of redemption in violation of common law or Section 2889. This section shall not be construed to make valid or effective an otherwise unlawful option nor shall any inference be drawn from this section as to the validity or application of common law with respect to residential real property containing four or fewer units.
Ca. Civ. Code § 2906