UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CYpYkRaDeT+JCHB3AQNeDPcupaQ6myztOduOOxkDO0g='
WHERE
key_id = '4a32d756dd9d2ba3a095c31ba6f0b1589829fd287f48d9ea352bd78f789613d1'
AND (
token = 'CYpYkRaDeT+JCHB3AQNeDPcupaQ6myztOduOOxkDO0g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)