UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '77f6+NlJBlD0CmwRRWGL9Zb0zP8pKCcyURpoa0LU+xE=' 
WHERE 
  key_id = 'fa3ed1f24e87c8d73ebc9b605e0f202b96bcd8dd9fbeb27fc78558f1898a052c' 
  AND (
    token = '77f6+NlJBlD0CmwRRWGL9Zb0zP8pKCcyURpoa0LU+xE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019