Its a shift lock noise that appears when car is in Park and you have to press or touch brake pedal to release that lock: Its a safety feature.
This noise DEFINITELY should not come while driving, as that lock is already disengage and thats why you are driving. You should immediately show this flaw to dealer, as it might create some road side break down issue. They might make it look very small due to their work load or for time to honour the warranty, but its related with Gear box so leave no doubt for tommorow when you dont have warranty. Get it fix sooner than later.