UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '07txIhuCwhj9AYipdMRfrBq/tXhtwKzqXfhg+a70ljc='
WHERE
key_id = '67e6cef4dbf4a4d691da2067747499dac562a3c6fef7bbaa467ebcb80313d517'
AND (
token = '07txIhuCwhj9AYipdMRfrBq/tXhtwKzqXfhg+a70ljc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)