Before
Luckily you can't actually open the door when plane is at altitude.
There are secondary locks controlled by the cockpit. Even without these the doors in airliner cabins are "plug" doors. They are tapered where they are wider on the inside than the outside which is why they open inward. When they pressurize the plane the difference in air pressure pushes the door into the hole like a rubber stopper plug. At altitude it can take tens of thousands of pounds of force to open.
You may be able to do it on the ground or during take off / landing because there is no/little pressure difference and they typically don't double lock until in the air in case of a crash.
After
Fortunately, you can’t open the door when the plane is high.
There are secondary locks controlled by the cockpit. Although these doors are not available, the cockpits have tall doors. It is depicted in areas that are wider on the outside, trying to open on the inside. The difference in air pressure when they press the plane pushes the door open like a rubber holder. It may take tens of thousands of pounds to open a bay.
You can do this on the ground or during a flight / landing, because the pressure difference is not significant / does not usually lock in the air twice in the event of a collision.