Key slot vertical = locked
Key Slot horizontal = unlocked

Pull the whole thing off and give it a good soaking in WD40. The back of the mechanism gets all gunked up. A blast with degreaser or carby cleaner wouldn't go astray either.

The boot lock is probably the least used lock on the car so what happens is that the key wears out and is no longer recognised by the lock.

A good locksmith will be able to cut a new key "from the numbers" rather than copying a stuffed key. You'll need to provide a numbered lock for them to look up the codes, the door handles or the ignition lock may have the number stamped on the barrels or you might have an original key.

The sledgehammer approach is to take remove ALL the locks and drop them off at the locksmith for a one key fits all solution.

Pete