We propose a simultaneous spatiotemporal filter optimization algorithm for the single trial ElectroEncephaloGraphy (EEG) classification problem. The algorithm is a generalization of the Common Spatial Pattern (CSP) algorithm, which incorporates non-homogeneous weighting of the crossspectrum matrices. The spectral weighting coefficients and the spatial filter are alternately updated. The validation results on 162 motor-imagery BCI datasets show that the proposed method outperforms wide-band filtered CSP in most datasets and gives comparable accuracy to Common Sparse Spectral Spatial Pattern (CSSSP) with far less computational cost. The proposed method is highly interpretable and modular at the same time because the temporal filter is parameterized in the spectral domain.