q-Analog of the gap equation for cuprates