In ST I-II, Q113, A7 St. Thomas argues that justification is instantaneous.
The justification of the ungodly is caused by the justifying grace of the Holy Spirit. Now the Holy Spirit comes to men's minds suddenly, according to Acts 2:2: "And suddenly there came a sound from heaven as of a mighty wind coming," upon which the gloss says that "the grace of the Holy Ghost knows no tardy efforts." Hence the justification of the ungodly is not successive, but instantaneous.
What we want to notice here, for purposes of this series, is twofold. First, that justification is caused by the grace of the Holy Spirt: and in this way we know that it is none of man's effort that can win him salvation; we are saved by the grace of God alone, as Aquinas says here.
Secondly, his theme is that justification is instantaneous. But this likewise rules out any possibility that our works play a role in the forgiveness of our sins.