UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ucVQvvbNTNrQgWGcD8Vnui0pdr8wk3/uYg3yrls0n14='
WHERE
key_id = 'e059f6c466cbd15ba1f0ddddec8e41bc58d0c41d372e942ff3a36f27a339a6b2'
AND (
token = 'ucVQvvbNTNrQgWGcD8Vnui0pdr8wk3/uYg3yrls0n14='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)