I used various settings TBH. If the cars were coming toward me and were sliding i set to freeze action max aperture, then between 1/640 and 1/1000 depending on the light as the sun was in and out, also mostly iso400. If i was panning i used more like 1/250 @around f8, thus blurring the background.
Thanks for the comments, as you said the d40 performs well with a decent lens and good light.