A key storage device comprising: a tubular housing having an open proximal end and a distal end, a sliding carriage insertable into the proximal end of the housing, the sliding carriage comprising a compartment for a key to be stored, the sliding carriage being displaceable between an open position in which a majority of the sliding carriage is outside of the housing and the compartment is accessible for key retrieval, and a closed position in which the majority of the sliding carriage is inside the housing and the compartment is inaccessible, a control unit, and a lock mechanism arranged within the tubular housing, the lock mechanism having a locked state in which the sliding carriage is kept locked in its closed position and prevented from being displaced to its open position, and the lock mechanism having an unlocked state in which the sliding carriage may be displaced to its open position, said lock mechanism comprising a piston and a catch member which are both movable between respective first positions in the locked state of the lock mechanism and respective second positions in the unlocked state of the lock mechanism, an electric motor coupled for causing movement of the piston of the lock mechanism, wherein the control unit is adapted to cause the lock mechanism to switch from its unlocked state to its locked state by actuating the motor and thereby causing movement of the piston from its second position to its first position, the movement of the piston in turn causing movement of the catch member from its second position to its first position; wherein the control unit is adapted, based on an external input, to allow the lock mechanism to switch from its locked state to its unlocked state by actuating the motor and thereby causing movement of the piston from its first position to its second position, the movement of the piston in turn allowing movement of the catch member from its first position to its second position; wherein the piston is movable in an axial direction of the sliding carriage and comprises a slanted edge, wherein, when the piston is moved towards the first position thereof, it pushes the catch member towards the first position thereof into engagement with the sliding carriage, thereby keeping the sliding carriage locked in its closed position; and wherein the catch member is a ball or cylinder. a tubular housing having an open proximal end and a distal end, a sliding carriage insertable into the proximal end of the housing, the sliding carriage comprising a compartment for a key to be stored, the sliding carriage being displaceable between an open position in which a majority of the sliding carriage is outside of the housing and the compartment is accessible for key retrieval, and a closed position in which the majority of the sliding carriage is inside the housing and the compartment is inaccessible, a control unit, and a lock mechanism arranged within the tubular housing, the lock mechanism having a locked state in which the sliding carriage is kept locked in its closed position and prevented from being displaced to its open position, and the lock mechanism having an unlocked state in which the sliding carriage may be displaced to its open position, said lock mechanism comprising a piston and a catch member which are both movable between respective first positions in the locked state of the lock mechanism and respective second positions in the unlocked state of the lock mechanism, an electric motor coupled for causing movement of the piston of the lock mechanism, wherein the control unit is adapted to cause the lock mechanism to switch from its unlocked state to its locked state by actuating the motor and thereby causing movement of the piston from its second position to its first position, the movement of the piston in turn causing movement of the catch member from its second position to its first position; wherein the control unit is adapted, based on an external input, to allow the lock mechanism to switch from its locked state to its unlocked state by actuating the motor and thereby causing movement of the piston from its first position to its second position, the movement of the piston in turn allowing movement of the catch member from its first position to its second position; wherein the piston is movable in an axial direction of the sliding carriage and comprises a slanted edge, wherein, when the piston is moved towards the first position thereof, it pushes the catch member towards the first position thereof into engagement with the sliding carriage, thereby keeping the sliding carriage locked in its closed position; and wherein the catch member is a ball or cylinder.