I see a lot of good advice being given and received here. What I have to add is that you should get yourself used to ALWAYS staying alert to what's going around you, and who is around you. That means keeping your head generally at a level with the horizon. When standing near your car getting your keys out, do it by feel as you look around your vicinity, and LOOK like you're looking. The last thing a mugger wannabe desires is for you to know he's coming, and for you to be the sort of person who is alert to your surroundings.
Carry a gun, if at all possible. But be aware of the escalation of force, and carry IN ADDITION to the gun a can of pepper spray and an impact weapon, such as an ASP baton. First fight with words, then with the spray, then with the baton, and lastly with the gun. This is for your LEGAL protection, unfortunately. Imagine how good you'd look in court if you clubbed the guy with the ASP after the spray had insufficient effect and you could tell the judge, "But I didn't shoot him, though I could have."
When entering my car and getting ready to leave anywhere, I do the following checklist, which I call the "DeCiBLe" checklist (DCBL):
1) DOORS: Lock your doors first thing, even before you start the car. The first thing you want is for no one to be able to grab you out of your own car door.
2) CAR: Start the car. Do this before anything else, should you find yourself in immediate need of bugging outta there.
3) BELT: Put on your seatbelt. You may actually find yourself HAVING to crash in order to save your own life. Best to be able to walk away.
4) LIGHTS: I don't put on my lights until the moment I put the car into gear. Why? Why should I alert someone roaming the parking lot that I am in my car, preparing to leave? Why not leave it difficult for him to determine which car it is that is running?
The reason behind the list's order is based upon which things you can do without having done the others. You can't drive away if you are getting yanked out of the car, so you lock the door first. You can't drive away with your seat belt fastened and the car not started, so you start the car. You can drive away with your lights still off but if you do so in haste and have an accident you will wish for that seat belt. You can generally drive a distance with your lights not yet on, so they are the last required step. Besides, who hasn't ever driven a mile and then had someone flash their lights saying, "Buddy, put your damn lights on"?
Jim March: BEST OF LUCK with your fight against the fascist sheriff. Right is on your side, and my support is behind you!