UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FD3jU114sTcCCvWjYEO2q36tTluYbh7r9bNKnsBZlIc='
WHERE
key_id = '952cb82c726ff6b83abd14bc9d018e710022def502a5decf6d6104e85e48146e'
AND (
token = 'FD3jU114sTcCCvWjYEO2q36tTluYbh7r9bNKnsBZlIc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)