Best way to implement ranged communication?

Okay so this requires a bit of explaining. I have a door that turns a handle via an arduino board(UNO). However, I really want it to be independent of my PC(unlike my other projects). I want to communicate with it from a range of 4-5 meters that can preferably communicate with the board through a thick(ish) wall. My first go to was creating an app and a private server so I can activate it through the app, and then the app will communicate to the server which will then send the appropriate data to the board. However I feel like this is a horribly inefficient way. My perfect scenario would be to have something the size of a key-fob I could press in order to communicate with the board on the other side of the wall. What would be the best way to achieve this or at least get somewhat close to achieving this?

You can't limit the range that a device listens. If the device is capable of receiving data sent from 30 meters away, you can't know how far away the transmitter actually was, and reject data because the transmitter was too far away.

Typically, you'd choose a transmitter and receiver that managed the minimum distance that you need. If you only need 5 meters, then choose a device that can transmit at least 5 meters. Don't worry about the fact that they might also work to 8 or 10 meters.

Pick some devices. Understand their range. Get the code working. Then, think about miniaturization.

Perhaps you can try to incorporate RFID. Have a reader behind the door and use your phone to do HCE (Host-based card emulation overview  |  Android Developers). This works with HF RFID so you at most you can get ~1m range (and probably shorter if there's a door in the way).

You might try these RF key fobs and receivers.