UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ltq6UpBodw9WKxWsOJtwcgsxvgy8Cf3Mo7kmBivazBY='
WHERE
key_id = '0735323984314a92e373acf881c53db7f386db8f4526f26d51b2fc9c7e1265cb'
AND (
token = 'Ltq6UpBodw9WKxWsOJtwcgsxvgy8Cf3Mo7kmBivazBY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)