It sounds to me like you've got an immobilizer issue. For whatever reason, it believes that the car is being stolen even though you are obviously using the coded key and the car is in motion. It then cuts out the fuel pump as a theft-prevention measure which is causing your random cutting out and the crank-no start. When you lock and unlock the car, it resets the immobilizer and all is hunky dory for a while.
That seems like the most logical place to start, if you ask me. And oh yes, (IMG:
style_emoticons/default/00000732.gif)