UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5pi54pzzqPPZbNDQFF2aOl/UTmDnIgqOK/i/cfbRwK0=' 
WHERE 
  key_id = '4d75692de1546019f419d472a3aa7799fc756208bbfe7e7fd9aa232543424629' 
  AND (
    token = '5pi54pzzqPPZbNDQFF2aOl/UTmDnIgqOK/i/cfbRwK0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040