First guess would be the lock relay. I believe lock and unlock use a separate relay to do each, and the remote/keyless receiver as well as the door switches run the relays. Don't know if the door switches go through the keyless module, if so, it might be the problem. You need an electrical schematic to start to do some troubleshooting. You might try a friendly dealer for a photocopy of the circuit, or go to
www.alldatadiy.com