UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'dxzy93G/d9TXGcfSsMpygkh6OSP2aYR1Q/IMz/9UZDA=' 
WHERE 
  key_id = '7b6740dadc2ef80ea7b71028a7e9a698f9ed821fdfb2a92e86956a1ddfea2871' 
  AND (
    token = 'dxzy93G/d9TXGcfSsMpygkh6OSP2aYR1Q/IMz/9UZDA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023