UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fdwwiPlNvZ6lGOmfgY3PKxg/e2/9tRWiwUCwEli7TUs='
WHERE
key_id = '41e22c2db356d9a12fb8d71ceaf20e7ed0d38eefbe055f85bc65bcaa7c0bdd95'
AND (
token = 'fdwwiPlNvZ6lGOmfgY3PKxg/e2/9tRWiwUCwEli7TUs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)