UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eWX6u75nInPwiWO7uWQ+Whug+c6aa2GLnlQYQBz8dUs='
WHERE
key_id = '64fc817596bedfc3be6f55918393e7f8ff2a20bfcbbd4965669ac67d59332ff3'
AND (
token = 'eWX6u75nInPwiWO7uWQ+Whug+c6aa2GLnlQYQBz8dUs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)