UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xJqRS39/3MVWb3biJ0ZV0HZxZu7VQU8fjhHfHl92qiU='
WHERE
key_id = '755c747f5bdbe416dce5a8b7d92dc5b686bf147ef9745c237388533f7b78e0ed'
AND (
token = 'xJqRS39/3MVWb3biJ0ZV0HZxZu7VQU8fjhHfHl92qiU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)