For the court not to accept the testimony of a man of sin
“Do not put your hand with the wicked to be a malicious witness” Shmos 23:1
If a qualified witness knows the other is wicked while the judges are not aware of his sinfulness, he is forbidden to give testimony with the other, even truthful testimony, due to this prohibition- “do not put your hand with the wicked”
There is no need to say that if he knows that the other witness is going to give false testimony he is forbidden to testify with him.
This applies in all places at all times.