Theresa did not put the lock on the lair but when Alex walks in two seconds later, the lock is on the door.
When Harper makes all the apples fall down, there is one more left on the stand. When it switches to Alex and then switches back to the stand, there are no apples on it. In the next shot the one single apple has reappeared back on the stand, then disappears again in the next shot.
In the scene where Teresa allows Justin and Max to enter the lair and is deciding whether to re-lock the lair or leave it unlocked, she sets the lock on the table. When Alex enters the kitchen and begins speaking to Teresa, the lock is back on the door (although it remains unlocked).
Harper takes an apple off of a stand, causing them all to fall to the ground. Watch carefully and you'll notice that the stand is tilted downward and the front side is latched and released, which is what really causes the apples to fall.