In this paper, the joint user and beam scheduling problem in beam-based massive multiple-input multiple-output (MIMO) systems is formulated based on the Lyapunov-drift optimization framework and the optimal scheduling policy is given in a closed-form. To address the weighted sum rate maximization problem (mixed integer programming) arisen in the Lyapunov-drift maximization, an algorithm based on the block coordinated update is proposed and proved to converge to the global optimum of the relaxed convex problem. In order to make the scheduling decisions based only upon statistical channel state information (CSI), asymptotic expressions of the downlink broadcast channel capacity are derived. Simulation results based on widely-adopted spatial channel models are given, which show that the proposed scheme is close to the optimal scheduling scheme, and outperforms the state-of-the-art beam selection schemes.