Expansions of $q$-Bernoulli numbers