UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'TfGisVqCijnPjYdDZu1Uyy/V9Q//Vay53+VmpT8jrdY=' 
WHERE 
  key_id = '022c1b3ef4d64940fe22ead67aa4625b250d8c00bf340e2537973382d32a5d6f' 
  AND (
    token = 'TfGisVqCijnPjYdDZu1Uyy/V9Q//Vay53+VmpT8jrdY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00013