UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Wbh2gPly5gh6WYY8bG911xsuKHLgiyCz0JXpugBuF0s=' 
WHERE 
  key_id = '07925a6fbc51c69cdf3382c893ca6bff13f7477fdca350d48a8e3b972bed354d' 
  AND (
    token = 'Wbh2gPly5gh6WYY8bG911xsuKHLgiyCz0JXpugBuF0s=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032