The present invention discloses a coin operated device, whereby the articles inside the locker can still be taken out with the spare key of the locker provider without damaging the coin operated device when the key is lost. The coin operated device is installed in the door frame of a locker and comprises first and second lock cylinders respectively for the insertion of the spare key and the key. The second lock cylinder is used to lock or unlock the locker, wherein a coin is inserted into the coin operated device, and a coin triggered module lets the coin fall into a coin accommodation module; then, the key is turned to latch the lock tongue and lock the locker, and the coin accommodation module is simultaneously driven to let the coin stay in behind the coin return.