UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zy8WJRt05AKEIP1A52/6MTOp0WdWEXfJnBpQP/flTCQ='
WHERE
key_id = '44cf2fe6d703e81d88ad0771281061eea859f6b523c8bd9c4b83cd9c3afc7ff4'
AND (
token = 'zy8WJRt05AKEIP1A52/6MTOp0WdWEXfJnBpQP/flTCQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)