For Slough, it was to be a third successive defeat, but the Rebels started brightly, with Ryan O'Toole ballooning a shot over the bar from a low Jake Parsons cross in the first minute.
Slough looked the more likely to open the scoring, but the Royston defence, marshalled by Joe De La Salle, kept Parsons at bay on more than one occasion, and goalkeeper Will Norris fielded long-range efforts from Parsons and Adam Martin.
Kyle Anthony sent a header wide, and Dan Burnell fired over after Norris failed to deal fully with a cross.
Soon after, Slough had their clearest effort on goal when a foul on Dave Deeney 20 yards out gave the midfielder the chance to test Norris, but the effort was easily claimed.
Rebels continued to press, but were punished shortly before half-time when Lewis Endacott's effort was saved by Warrington, but not fully cleared and Lockett was able to finish smartly with his left foot, under the body of the goalkeeper.
Slough looked determined to work their way back into the game early in the second half, but tested Norris infrequently, Parsons seeing an effort easily stopped from distance, and the Royston rearguard denying Slough time and again, whilst Kaan Fehmi drilled well wide for the hosts.
Full-backs Sean Fraser and Danny Murphy were replaced, with Ollie Burgess and Ed Smith replacing them, but neither were able to make an impact.
Dalton O'Brien almost had a sight of goal for Royston but Dave Woozley was on hand to cover and clear – but the home side did score the killer second goal soon after.
A long goal kick was flicked on by Luke Robins, who was able to latch on to the ball and lob the ball over the stranded James Warrington from the edge of the box, followed by an acrobatic celebration.
With the added cushion, Royston poured forward in search of a third, but O'Brien blazed well over from a good position and Robins saw a header rebound back off the bar.
A frustrated Slough could only muster a weak effort from substitute Ed Smith as the game drew to a close, and the home side went closest when full-back Taylor Parr lobbed a shot which bounced up off the heavily-sanded goalmouth and just over the bar.
Royston Town Line up
Norris, Parr, Wilson, De La Salle, Bradshaw (c), Edwards, Ingrey, Endacott, Fehmi, Lockett, Robins. Subs: Standen, Apostolos, O'Brien, Reynolds.