This one was covered a week or two ago. Squirt switch cleaner or graphite lube in the ignition switch and work it a few times, flicking the key out quickly once it's turned to the off position. Something inside is sticking making the car think the key is in, hence not locking too. Some people use WD40 or equivalent but be careful as that will collect moisture and dirt after a while.