Chesterfield missed a great chance to take the lead when Lester was tripped by Danny O'Donnell in the eighth minute but Davide Somma's weak spot-kick was easily saved.
Phillips rescued Crewe again with another penalty save, this time from Wade Small, after Matt Mitchell-King had handled in the 22nd minute and the visitors took advantage when Donaldson scored with a first-time shot from the edge of the box three minutes later.
Crewe netted again in the 35th minute when Westwood curled a superb free-kick from just outside the area inside the right post for his first senior goal and after Lester had struck the bar, Calvin Zola was denied by Tommy Lee.
Chesterfield piled on the pressure in the second half but Lee saved well from Donaldson before Talbot pulled one back with a rising drive in the 73rd minute.
Donaldson eased Crewe's nerves six minutes from time by setting up Murphy to steer in the third but Lester replied to set up a tense finish.