Nothing in this article prohibits the execution of an agreement between a buyer and seller whereby the seller retains a security interest in goods sold to the buyer until full payment therefor has been made. For purposes of release of the security interests, in the case of goods or services purchased on different dates, the first purchased shall be deemed first paid for, and in the case of goods or services purchased on the same date, the lowest priced shall be deemed first paid for, and all amounts allocated to payment of these goods or services shall be applied to accomplish that result. However, any downpayment on a specific purchase shall be deemed to be allocated in its entirety to such purchase.
Ca. Civ. Code § 1810.6