UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'YTaMqDB2AVpllQ2BxImYCtxcG/VzM6p40DphyX1GugE=' 
WHERE 
  key_id = '16f92720f1f801a97d3bf93dd3a0559f48607b430f1d13e8db9b5e19b5bc443d' 
  AND (
    token = 'YTaMqDB2AVpllQ2BxImYCtxcG/VzM6p40DphyX1GugE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00066