Combining mechanical and electronic locking within a single access control system