I know at least with my CX-5, you can lock the second key in the car with the first. But if it's left in there for a period of time, and the first key leaves the vehicle - the key left in the car gets disabled (this prevents car theft).
There is a re-enable process that requires using the first key to re-enable the second key.
There is a re-enable process that requires using the first key to re-enable the second key.