'Locks a subject.'

@utils.Synchronized
def SetLock(self, subject, expires, token):

    subject = utils.SmartStr(subject)
    query = 'INSERT    OR    REPLACE    INTO    lock    VALUES(?,    ?,    ?)'
    args = (subject, expires, token)
    self.Execute(query, args)
    self.dirty = True
