I suggest you read the How to Choose a Story Format section of the Twine Wiki to learn what a story format is. I will assume you are using the default story format which is Harlowe v2.1.0 who's manual can be found here.
You can use a story variable to track if a particular event or action has occurred and then later test the current value of that story variable to determine if a particular outcome should occur.
1. The following example uses a (set:) macro to initialise an $unlocked story variable to be Boolean false within your project's startup tagged special passage, if you don't already have such a passage then:
a. create a new passage and assign it whatever name you like, I suggest Startup.
b. assign this new passage a startup tag (all lowercase and no space characters)
(set: $unlocked to false)
2. The following example uses a (link:) macro to allow the Reader to unlock the locked item, this is achieved by changing the $unlocked story variable's value to true.
(link: "Unlock the item")[
(set: $unlocked to true)
]
3. The following example uses an (if:) macro to determine if the item has been unlocked or not, this is done by testing if the $unlocked story variable currently equals true.
(if: $unlocked)[The item has been unlocked!]
... you can also use the Boolean not operator to test if the $unlocked story variable currently equals false as the following example demonstrates.
(if: not $unlocked)[You still need to unlock the item!]
...make a link that goes back to the start?
Yes. Assuming that your start passage is named Start then you could use either of the following links to return to that passage. The first example uses a Markup based link and the second uses a (link:) macro combined with a (go-to:) macro.
[[Return to the start->Start]]
(link: "Return to the start")[
(go-to: "Start")
]
...however, the above will NOT cause the story variables to reset to their initial values!
If you truly want you allow the Reader to restart the story afresh then I suggest using the (reload:) macro to do that like so.
(link: "Restart the story")[
(reload:)
]