I had an issue like this with my car,
When started from cold, it would start perfecttly, but whn driven and engine is warm, and i parked up and i tried starting it again, it would not start, I had my doubts on the crank position sensor & knock sensor, but it turned out to be the temp sensor, so i un-plugged this and it fired up straight away, so then i hooked it up on VAGCOM and the in car temprature needle was standing on 90, but on VAGCOM, it was showing me that its on 71, so that was the culprit, giving false readings, have a look at that.
Thanks