One who obtains a thing without the consent of its owner, or by a consent afterwards rescinded, or by an unlawful exaction which the owner could not at the time prudently refuse, must restore it to the person from whom it was thus obtained, unless he has acquired a title thereto superior to that of such other person, or unless the transaction was corrupt and unlawful on both sides.
Ca. Civ. Code § 1712