Veteran Antonio Cairoli beat Gautier Paulin by just more than one second to win the MXGP Race 1 at Matterley Basin in Great Britain.