UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Vhf/AFaoA+O7LXuLqadMIxgyuLC5ulGYHvr0EmExgFg='
WHERE
key_id = 'b3fa703d7df46b4d2a6043e5720afb3bfb24cfed00108988498ad40fe2e7672d'
AND (
token = 'Vhf/AFaoA+O7LXuLqadMIxgyuLC5ulGYHvr0EmExgFg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)