I had a similar issue as your that I reported here:
http://xdaforums.com/showthread.php?t=2760252
(Don't know if that link will appear correctly in this post)
I've had my exchanged dcvice for 2 days and last night about 6:30 pm it suddenly acted up again... power key worldn't work, took a battery pull to restart, came on with an unlocked lock with the word "custom" under it, looking at device status in the settings showed "custom" not original, and phone would go to sleep and not wake up. The device new device had never been conected to any computer (I was still trying to understand what I had that caused the error in the first place. The battery was at about 58 percent when this happened. I did plug the phone into a charger (after a battery pull reset) and let the phone charge a bit... at about 65 percent battery I decided I would look at it at again and when I did it was back to original, a reboot did not display custom nor the open lock.
Sorry it doesn't help much but don't feel alone.
Tutor