If it won't unlock then it's the one on the tailgate that is about the size of an old tape cassette, if it's the keyless start not working, then it's the one above the headlining.
Intermittent faults can be the worst to nail down, try tracking the conditions when it doesn't work to try and calculate the best time to test when it isn't working (temperature / weather / time since last use / battery voltage etc.) I had one years ago that only faulted if the car was parked in a certain spot, turned out the reflected heat from the sun was warming the roof up in just the 'wrong' spot, causing the module to shut down.