UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LgIAdkkakx6COl2rHAmE1vJp+okbk/JjUF5+2ZZbIR8=' 
WHERE 
  key_id = '1ae575d52ff5df5dd1b79a307d5cd99f5571d636e721e4b82bfaa1e254718917' 
  AND (
    token = 'LgIAdkkakx6COl2rHAmE1vJp+okbk/JjUF5+2ZZbIR8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00014