UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GTYCpzqfLFriaGyTPZhkOP2Ee9UWAz0caOLtFtQrPDU='
WHERE
key_id = '37c07888f767e55c1bd25b45560360b4d3db12fbff63c3df6aff37d3b52c3ce8'
AND (
token = 'GTYCpzqfLFriaGyTPZhkOP2Ee9UWAz0caOLtFtQrPDU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)