1. A key device comprising: a mechanical interface for mechanically manoeuvring a lock device upon successful access control, the mechanical interface comprising a connector for powering the lock device and for communication with the lock device such that the lock device is able to perform electronic access control using the key device; a clock; a memory; a radio communication module; and a controller arranged to, using the radio communication module communicate online with an access control device and use the memory as temporary storage for offline communication between the access control device and one or more lock devices; wherein the controller is arranged to receive an updated time for the clock of the key device by sending a challenge code to the access control device; receiving a response code along with the updated time, the response code being based on the challenge code; and determining the updated time to be valid when the response code is determined to be valid.