UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IzzFPi6FVWkHFrZGpdLAttubrLJ4bo1BYI2nDD/Bouc='
WHERE
key_id = '05cdc1c60e93fb86aeba2afdacf808aa5104265d91f6344fdd6870dc9938cf4c'
AND (
token = 'IzzFPi6FVWkHFrZGpdLAttubrLJ4bo1BYI2nDD/Bouc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)