UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BFfNBWyXHscvDYVzwKMnVAhC89MOSL7p3AwMtXxR5XU='
WHERE
key_id = '6926fc972d20cd41f504312775f3371c12b0bf07f7ed419ac40e4c8b45bd450d'
AND (
token = 'BFfNBWyXHscvDYVzwKMnVAhC89MOSL7p3AwMtXxR5XU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)