The alarm system and immobiliser are two different systems and it sounds like you have an immobiliser fault. It's not unheard of for keys to unpair from the system due to age, but if both keys worked and now they dont i would lean toward the immobiliser rather than the keys as id be surprised if two depaired at the same time.
Something to note, after 30 seconds of unlocking the car the immobiliser kicks in if you havnt started it. you need to turn the ignition on, then press the unlock button again to turn it off again. you may know that already but i thought better to mention it just in case you didnt and wasnt actualy anything wrong.