I had this problem the other week, wouldnt lock, horn kept beeping, opened and closed all doors and bonnet to no avail, then noticed the ignition switch was not completely turned to the switched off position, the ignition switch is worn, had to dismantle it a while back to remove some of the brass "fingers" and the key is a bit loose. Turned it all the way off and normal locking resumed.