To comment on what 911jason said:
1. if you put your smartkey next to your cell phone (same pocket for example), the key might not be visible to the car's sensors due to interference.
2. If you stick around the car, it won't lock until 30 seconds later and you make no attempt to unlock the car. Of course, if for some reasons the car's sensors cannot detect the smartkey on you, it thinks that you already left the car, it will lock in 3 seconds. This could happen, says if you put your smarkey together with your cell phone (e.g. same pocket)
Mine works 99% of the time since I never put my key and cell phone in the same pocket.
I had it activated since new. It has been working fine for me for 6 years.