Since you have the long data type specifier in front of the interval there, that is a local variable so is only visible inside of the if block. It is a totally different variable that the one declared above setup() and used in the millis() timer.
A link to a tutorial for what @anon73444976 mentions.