UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GOMHr2ieDm1leOMoT5QO/Of5WgXde/nQkhybJKfM984=' 
WHERE 
  key_id = '92312347fc7de7f9e15cc18a51c4c4dcdfcee0aa8c61319fc98fc12e0dfaecac' 
  AND (
    token = 'GOMHr2ieDm1leOMoT5QO/Of5WgXde/nQkhybJKfM984=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029