I took some time to look into this. It seems the problem is that the lap timer starts/stops when the car crosses the finish line while the total timer starts as soon as the race starts. Since the car starts a few meters behind the finish line it takes a couple of seconds before the lap timer begins counting while the total timer is already running.
I used to start both timers at the same time before, but IIRC I had to change it because of a bug that allowed players to skip a large part of the track. I don’t know how to change this without breaking existing records. So I think I’ll leave the discrepancy as it is for now. Thanks for the comment, though.