UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Vv9o9xTRORLGg6Bfn3b9pHY+9xaK+e5Kgiib+H2XcFY=' 
WHERE 
  key_id = '8e94081e9696d489d9905f3582b575df3eea782d340aa4f593b19cd5ba4fa58f' 
  AND (
    token = 'Vv9o9xTRORLGg6Bfn3b9pHY+9xaK+e5Kgiib+H2XcFY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031