Recently, Ni and Pan proved a $q$-congruence on certain sums involving central $q$-binomial coefficients, which was conjectured by Guo. In this paper, we give a generalization of this $q$-congruence and confirm another $q$-congruence, also conjectured by Guo. Our proof uses Ni and Pans technique and a simple $q$-congruence observed by Guo and Schlosser.