UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3GgNtK9MFN2vVixIRQDfu3or3aEUUptu8FjnqUWdq3g=' 
WHERE 
  key_id = '44130a1945ebcefcd676f9521a4bbf4294f79bcbf4f7b3851daec6d5242bd001' 
  AND (
    token = '3GgNtK9MFN2vVixIRQDfu3or3aEUUptu8FjnqUWdq3g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033