While the other answers brought important clarifications about the context and what exactly was meant, this is a rather interesting question to ponder in its own right.
In this case we have to make a distinction between thermodynamics, which is a theory based on the empirical facts, and statistical physics, which is a result of logical reasoning. In other words, we have to make distinction between a law of nature and a human-made theory. It is very likely that the authors of the quote meant the latter.
While an empirical theory is always at risk of being contradicted by an experiment, undermining mathematical proofs is much more difficult - unless there are errors in the proofs, this requires questioning the underlying axioms. Indeed, relativity and QM came into existence by questioning the underlying assumptions of Newtonian mechanics. Statistical physics is built essentially around counting the number of available states and some general assumptions about the accessibility of the states (such as ergodicity). Specifically:
- We know exactly what these assumptions are and where the conclusions of statistical physics would not hold
- Within the range of applicability of these assumptions, the theory is as good as our logical reasoning.
In other words: it is okay, if something contradicts known facts, it is not okay, if it contradicts logical reasoning. (From the point of view of physics, obviously.)
It is worth adding the Einstein's full original quote which makes the same point:
A theory is more impressive the greater the simplicity of its premises is, the more
different kinds of things it relates, and the more extended its area of applicability.
Therefore the deep impression which classical thermodynamics made upon me. It is the
only physical theory of universal content concerning which I am convinced that, within
the framework of the applicability of its basic concepts, it will never be overthrown.