The murderer and another person (let's call him person X) entered the Simon's office by unlocking it with a key, person X locked the room from the inside (but leaving the key outside the room), the murderer killed Simon, person X unlocked the door, they both went out, closed the door, then locked the door from the outside. The actual key never entered the room though.