Serial Monitor statements

Please CTRL+T in the arduino IDE before copy-n-pasting code, as it makes the sketch easier to read.
Then use code tags in the forum editor when inserting code (button with # sign on it).

boolean above = true;
boolean below = false;


void setup() {
    Serial.begin(9600);
}


void loop() {
    int sensorValue = analogRead(A0);

    if (sensorValue < 500)
    {
        if (above = true)
        {
            Serial.println("oh, i'm down!");
            above = false;
            below = true;
            // here i try to "lock the door", once the line is printed. But it still doesn't work....
        }
    }
    else
    {
        Serial.println("Oh, i'm Up!");
        above = true;
        below = false;

    }
}

There's an error:

        if (above = true)

This will always be true, because you're not making a test, but an assignment. You need two equal signs:

        if (above == true)

The trick is to use a "prevState" variable and check that against the current analog level. If the previous reading was low and the current one is high, you print "From low to high". Same story if the previous was high and the current one is low.

HTH