UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/OXZUbm8IeAeUNWTEP50OgaQkUte4PHcrvY4Kz8/gLo=' 
WHERE 
  key_id = 'd72f4afeb4cd20b3c6701674240dae1135a9871fd8da19d2d93273a4883ef56f' 
  AND (
    token = '/OXZUbm8IeAeUNWTEP50OgaQkUte4PHcrvY4Kz8/gLo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029