Most leases will explicitly require the landlord have unfettered access to the property. Usually, the only caveat being that the tenant will be given some amount of notice. My leases say 24 hours.
/If I ever came to one of my properties and my key didn't work, you better bet you'd be evicted.