Deep Neural Networks have been applied very successfully in image recognition and natural language processing. Recently these powerful methods have received attention also in the brain-computer interface (BCI) community. Here, we introduce a convolutional neural network (CNN) architecture optimized for classification of brain states from non-invasive magnetoencephalographic (MEG) measurements. The model structure is motivated by a state-of-the-art generative model of the MEG signal and is thus readily interpretable in neurophysiological terms. We demonstrate that the proposed model is highly accurate in decoding event-related responses as well as modulations of oscillatory brain activity, and is robust with respect to inter-individual differences. Importantly, the model generalizes well across users: when trained on data pooled from previous users, it can successfully perform on new users. Thus, the time-consuming BCI calibration can be omitted. Moreover, the model can be incrementally updated, resulting in +8.9% average accuracy improvement in offline experiments and +17.0% in a real-time BCI. We argue that this model can be used in practical BCIs and basic neuroscience research.