UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3nbVhmDYdsuYs0hN7BKtWSPvyFq7MfQHcnVeOHQtwDg='
WHERE
key_id = '2efccf9af934d82b2b8090fd5179d40a64142331f80a8e88a6ab161a521da494'
AND (
token = '3nbVhmDYdsuYs0hN7BKtWSPvyFq7MfQHcnVeOHQtwDg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)