not a problem of version

A subquery using ORDER requires a TOP clause

Change the query to

SELECT *
FROM
  (SELECT TOP ALL
          sslog.userRowid,
          sslog.CreateDate,
          sslog.CreateTime,
          Sslog.SSUSR,
          sslog.Terminal,
          ssuser.Initials,
          ssuser.USName
   FROM SUser_Log sslog
   LEFT JOIN DHC_SSuser ssuser ON (Sslog.SSUSR = ssuser.userRowid
                                   OR sslog.ssusr = ssuser.Initials
                                   OR sslog.ssusr = ssuser.USName)
   WHERE ssuser.USName ['admin'
   ORDER BY sslog.CreateDate DESC)
WHERE %VID> 5

You have 2 Options for LOCK

1) LOCK lockargument  
either you succeed or you hang until you get success or forever

2) LOCK lockargument:timeout 

timeout releases your attempt after the defined time
and signal by system variable $TEST if you were successful or not

so your code may have this structure

LOCK  +(^a,^b,^c):0
If $TEST  {
    write "successful Locked",! 
}  ELSE  { write "attempt to Lock failed",! }

more on LOCK: http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

if  failing you may want to identify your competitor using  ^$LOCK

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...

I'd try to have just 1 query with 3 parameters and switch them on/off as you need

SELECT ID FROM Table WHERE (Field1 %STARTSWITH :par1 
AND ((0=:sw2) OR (
Field2 = :par2)) 
AND ((0=:sw3) OR (
Field3 = :par3))

Now using only par1  means (par1=whatever, sw2=0,sw3=0, par2="",par3="") so the 2nd + 3rd condition is switched off and par2,par3 ignored

2nd case: (par1=whatever,  par2=something, sw2=1,sw3=1, par3="") so only 3rd condition is switched off  par 3 ignored

3rd case: (par1=whatever,  par2=something, par3=other, sw2=1,sw3=1) all conditions active

you see this could be extended easily