The DMV, prior to generating renewal notices, checks the Bureau of Automotive Repairs VID (Vehicle Information Database). They will use the VID to determine what type of smog inspection your vehicle requires (STAR or regular) and also whether your vehicle even requires a smog check (is the vehicle less than 8 years old? No smog check required). They will not check whether a valid certificate is on record. That check will occur once your payment is submitted. And you are only allowed to submit payment up to 90 days in advance of your current registration expiration date; either online or via mail.
At the time your payment is accepted (received by the DMV), your smog certificate must be valid. When the DMV receives your payment, they will check to see if a valid smog certificate is on record and not before that. The DMV will not check if a valid smog is on record when generating the renewal notice. The validity of the smog certificate only comes into play at the time you make your registration renewal payment.
To keep things in proper sequence, we highly recommend obtaining a smog check only after your renewal notice is generated, which typically occurs around 90 days prior to the vehicle's current expiration date.
We also recommend taking a look at the services offered by https://www.needtags.com. If renewing through their service, you can receive your new registration card and sticker, mailed anywhere in the U.S., as well as they process and complete registration orders on the same they smog check completion information is received on the VID; unlike the DMV, which typically takes 2-3 weeks after receiving smog check information to mail out new tags... and only to the address on DMV records.