(a)
Where there is a partial taking of property encumbered by a lien, the lienholder may share in the award only to the extent determined by the court to be necessary to prevent an impairment of the security, and the lien shall continue upon the part of the property not taken as security for the unpaid portion of the indebtedness.(b)
Notwithstanding subdivision (a), the lienholder and the property owner may at any time after commencement of the proceeding agree that some or all of the award shall be apportioned to the lienholder on the indebtedness.
Source:
Section 1265.225, https://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=CCP§ionNum=1265.225.
.