UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'B0sEkhBuDuyTuKdI/40We2bRuDAu7RYOP00mB377JKU=' 
WHERE 
  key_id = '75e253a7cd27289a3e969b9940849ca62bea0e09741e2a57b91bb8bf554cedea' 
  AND (
    token = 'B0sEkhBuDuyTuKdI/40We2bRuDAu7RYOP00mB377JKU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033