UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l/BKdCLyhRh6Ee7pVJOUIQWZuJY3uWwRA/NBQELg8sk='
WHERE
key_id = '1f7e3aacde7dae7f84716902c533b682c816e6d68cffa8df8a832ae39e5e774f'
AND (
token = 'l/BKdCLyhRh6Ee7pVJOUIQWZuJY3uWwRA/NBQELg8sk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)