Our guests don't receive the (digital) house manual until 2-3 days prior to arrival. While it contains information about the rental (such as the address and options for traveling to it), the code isn't sent until the day of arrival.
We send the code the morning of their arrival to BOTH Airbnb message and their personal e-mail. Unfortunately, Airbnb's interface sometimes goes down. We also ask the guest to confirm that they have received the information. Should there be an issue with a code, we can disable or change it immediately. Code is disabled upon check-out.
You might be more limited with a lockbox code, but the same concepts should apply.