locked record has execution contexts editable like all the workflow actions, if you just lock by client+ui, pretty much all scripts will be able to access it
alternatively you an consider user/role, since most scripts can execute as current user (or also potentially as system like M/R) depends on usecase!