What you are hearing is the safety lock on the shifter. You must depress the brake to put the car in gear. I notice when I am stopped at a light and press the brake you still hear it click. Now why it does that I have no idea.
Make sure the keyless entry on your key chain is not tapping the dashboard. My wife heard a low "thudding" type noise when she would slow and we noticed the keys hitting the dash. Sounds silly, but it wasn't obvious at first.
The noise you hear is the shift interlock solenoid. Mine does the same thing. I asked Nissan about it and they are supposed to be coming out with a fix. There is actually nothing wrong with your car....but I know the noise is somewhat annoying.
You'll hear the clicking sound whenever you're at a stop, etiher in park or in gear...when engaging or releasing the brake.
Other than the annoyance, there is really nothing wrong with the car...