In the US, key boxes seem the exception and smart locks are the rule. Nothing to lose, can be programmed to not work past a certain time, etc.
That works well for a single deadbolt. Many years ago we stayed in a friends apartment in Madrid. There were 3 keys for the locks, each at least a foot apart, and the door jamb was lined with metal to make it more difficult to break in. So it might not be simple and/or cheap to replace key boxes with smart locks.