1. Pay your vehicle registration. If your registration is expired over 6-months the police may tow the vehicle under CVC 22651(o)(1). It will be "inventoried" subsequent to towing and anything found during the inventory inspection is admissable in court.
2. Renew your drivers license on time. An expired drivers license is the same thing as an unlicensed driver CVC 12500(a). An unlicensed, or expired, drivers vehicle can be towed under CVC 22651(p) leading to an inventory inspection.
3. Pay your tickets. If you dont your drivers license may be suspended and your vehicle can be towed under CVC 22651(p) or impounded under CVC 14602.6(a). again leading to an inventory of the vehicle contents.
The best way to answer any request to search your vehicle is "I do not consent to a search of my vehicle." Said nice and clear so its captured on the officers tape recorder or patrol video system. simple yes or no answers may be misinterprited as explained earlier in this thread.