My '06 did that one afternoon while my wife and I were in the big Gaylord Auditorium in Nashville. Everything was normal when we parked and locked the truck to go inside, but the truck ignored the ignition key when we returned.
I sat there puzzled for a couple minutes thinking about it and not knowing anything else to do got out and removed the negative battery cables from both batteries. I left them off for five minutes then reinstalled them, started it, and drove away.
I can't explain it but guess something confused a computer. Removing the battery cables allowed some electronic device to reset.
Try it and let us know if it works.