Kenilworth Road was the venue for QPR's first league win of the season back in August, with the Rs having to wait another three months for their second to come against Cardiff City at the end of November.
Marti Cifuentes' side were rock bottom with 11 points from 16 games at the start of that day, but a run of just one defeat in the following nine matches has lifted them to the middle of the table with a points tally closer to the play-offs than the relegation zone.
And here they played like a team with confidence and created lots of chances, but also got the luck that so often finds its way to teams on a run of good form.
After Luton keeper Kaminski tipped the in-form Jimmy Dunne's header on to the crossbar with one of the saves of the season, Frey continued to make up for lost time as he scored his second goal in two starts since returning from injury.
The Swiss striker started and finished a fluid move that involved Paul Smyth and Fox before he neatly volleyed in at the far post, though the home side were fortunate the officials did not see the ball roll down the Swiss striker's arm before he did so.
Luton's equaliser in added time of added time, McGuinness rising highest to brilliantly head in off the far post, came against the run of play but the home side had to withstand a lot of pressure as the visitors came out buoyed by their late goal.
But fortune was on the side of Rangers again as Chair's effort, after Kenneth Paal rolled the ball across to the Morocco international from a free-kick, which was going well wide of the goal, went in off the unknowing Fox's heel for the the winning goal.
The hosts rode their luck at times and put in some big challenges to deny Luton at set-pieces, while substitute Alfie Lloyd hit the post in a lively cameo as they tried to see the game out.
McGuinness almost repeated his first-half heroics as he was found again at a corner as the match entered seven minutes of added time but the centre-back's header just kissed the crossbar on its way over, as QPR held on to claim all three points.