The closest that I'm aware of, is a script that monitors the input and if there's no input after a period of time, changes the nick and/or sets the away information. I realize that technically this doesn't monitor if the PC is locked or not, but I have no idea how, or even if, that information can be gotten.
Similar to:
on *:input:*:{
.timeraway 1 60 away_nick
}
alias away_nick {
.nick $anick
.away Away
}