Openly And When in the KJV
2 verses of the King James Version have both "openly" and "when".
Matthew 6:6 But thou, when thou prayest, enter into thy closet, and when thou hast shut thy door, pray to thy Father which is in secret; and thy Father which seeth in secret shall reward thee openly.
John 7:10 But when his brethren were gone up, then went he also up unto the feast, not openly, but as it were in secret.