Few diagnosis questions:
Key in or key out?
What is the position of the trunk control disconnect switch in the trunk?
Monogram or base? (smart key or not)
Was it just the door locks, trunk? Both?
issue with wiring, or with body ECU comes to mind
If it's a monogram, it has an extra smart key certification ECU (D40[a], 41[b], and 48[c] in wiring diagram.
EDIT: whoops, didn't read carefully, you said turning the key... not monogram then. Whatever, in that case, the door lock system is controlled by the main body ECU. There's a few modes/conditions that automatically actuate the door locks, mostly to prevent you from locking your keys in your car, but if something's wired up wrong, it could be working backwards. Alternatively, if the issue is inconsistent, it could just be a bad main body ECU.
Try to replicate the problem, document the conditions. If you can't make it happen consistently, It's almost definitely a bad body ECU. Good news is that's an unplug-and-replace type problem. Easy to get fixed by the dealer under warranty. If it's consistent, it might still be the body ECU, but if it isn't, somebody's going to have fun chasing wires.