Example script:
IF
<Your Private key's Public key pair> CHECKSIGVERIFY
ELSE
<Your Preferred inheritance date> CHECKLOCKTIMEVERIFY DROP
ENDIF
<Inheritor's Public key> CHECKSIG
In this script the inheritor is
always one of the signers when you want to spend those coins meaning the original owner will not be able to move their coin without the second signer.
If that's the intention it can be simplified like this using multisig (2 sigop count)
The intention is to keep the beneficiary unaware for security purposes.