UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cFG1UAxsLBP+l+xDFi0waH27ke2HKPcor9ebDiY/m0I='
WHERE
key_id = '2f25228e97fd0c28ab4abf0e9600641c437b51eb2cad85a4e1f12b79be22020e'
AND (
token = 'cFG1UAxsLBP+l+xDFi0waH27ke2HKPcor9ebDiY/m0I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)