. . . laws may be unjust in two senses. One involves being in opposition to human welfare . . . or also . . . from their form, for instance when burdens are assigned unequally within a group, even if they be ordered to the common good. Now, these are instruments of violence, rather than laws; as Augustine says On Free Choice (I, 5): "That which is not just is evidently no law."
Summa Theologiae, 13th century
Comment: It's revolutionary. What happened in America in 1776 is prefigured here. You can also see here the requirement of equal protection which is part of the 14th Amendment to the U.S. Constitution, a requirement which ensures that groups in similar circumstances are treated equally. Notice the strong words labeling unjust laws as "instruments of violence." Here are modern constitutional democracy's blatantly Christian roots. Of course, ultimately the view of Aquinas and Augustine is traceable to the Bible (see, for example, Acts 5:29).
It is also of interest to see Aquinas quoting Augustine. All indications are that Aquinas revered Augustine and even referred to him as "the Theologian." So it is just silly to try to make them theological competitors. It is usually mediocre, insecure "followers" who try to project such competition into the past.