The interior door button is bad on the door jam, this happen to me on my 2002, check it, if interior light doesn't come on the button is bad, the doors will relock on there own in 30 seconds, the button is stuck in the closed postion.
I have a 2013 Sonata, but I turned automatic door locking off in the System Settings. Perhaps it is the same for the 2011:
"When the vehicle is at a standstill, pressing the TRIP button for more than 2 seconds with the engine start/stop button in the ON position or engine running, the LCD screen on the cluster will change to the vehicle setting mode."
A forum community dedicated to Hyundai Sonata owners and enthusiasts. Come join the discussion about performance, modifications, appearance and body work, classifieds, troubleshooting, maintenance, and more!