UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ppVCDSYOStbJAM3SvAOFlOoLhfuzLJ0RKF/mf8MWOcQ=' 
WHERE 
  key_id = 'bb205c03096d061dfe0059a05384db8af724e24030bd11ac0579666f9b6cec46' 
  AND (
    token = 'ppVCDSYOStbJAM3SvAOFlOoLhfuzLJ0RKF/mf8MWOcQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021