UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3nzq/63/lqZ0OvnfnIfPiuSri7ebmsiBAxcPzp73Oxg=' 
WHERE 
  key_id = 'a4eadfcd21cce4a04230d4c4f6191a857a85bce90f98d979ebdeb648250eff00' 
  AND (
    token = '3nzq/63/lqZ0OvnfnIfPiuSri7ebmsiBAxcPzp73Oxg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017