UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'mUFmYNdCmnpnu3/DlxA7as3fl5cUr/E1JSHngq19Ugk=' 
WHERE 
  key_id = '86644fcea32d9c5f79e06d14481097961a2ba95869c19617187b1c51bbd725e2' 
  AND (
    token = 'mUFmYNdCmnpnu3/DlxA7as3fl5cUr/E1JSHngq19Ugk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040